import Vue from "vue"
import VueRouter from "vue-router"
import Index from "../views/one/Index.vue"
import About from "../views/one/About.vue"
import User from "../views/one/User.vue"
import Tabout from "../views/two/Tabout.vue"
import Tindex from "../views/two/Tindex.vue"
import Tuser from "../views/two/Tuser.vue"
import index from "../views/three/index.vue"
import table from "../views/three/table.vue"
Vue.use(VueRouter)

let routes = [
    {
        path: '/',
        redirect: '/index',

    },
    {
        path: '/index',
        component: Index,

    },
    {
        path: '/about',
        component: About,
        children: [
            {
                path: 'aboutTwo',
                component: Tabout,
                children: [
                    {
                        path: 'table',
                        component: table
                    },
                    {
                        path: 'index',
                        component: index
                    }
                ]
            },
            {
                path: 'indexTwo',
                component: Tindex
            },
            {
                path: 'userTwo',
                component: Tuser
            },
        ]

    },
    {
        path: '/user',
        component: User,
    },
]

let router = new VueRouter({
    routes,
    mode: "history"
})
export default router
